module Gml.Token where

data GmlToken =
        -- structures
        FunctionToken TokenSequence     |
        ArrayToken TokenSequence        |
        -- control operators
        ApplyToken                      |
        IfToken                         |
        -- number operators
        AddiToken                       |
        AddfToken                       |
        ACosToken                       |
        ASinToken                       |
        ClampfToken                     |
        CosToken                        |
        DiviToken                       |
        DivfToken                       |
        EqiToken                        |
        EqfToken                        |
        FloorToken                      |
        FracToken                       |
        LessiToken                      |
        LessfToken                      |
        ModiToken                       |
        MuliToken                       |
        MulfToken                       |
        NegiToken                       |
        NegfToken                       |
        ToRealToken                     |
        SinToken                        |
        SqrtToken                       |
        SubiToken                       |
        SubfToken                       |
        -- points
        PointToken Point                |
        GetXToken                       |
        GetYToken                       |
        GetZToken                       |
        CreatePointToken                |
        -- arrays
        GetToken                        |
        LengthToken                     |
        -- environment
        IdentifierToken String          |
        BinderToken String              |
        -- types
        BoolToken Bool                  |
        IntToken Int                    |
        RealToken Double                |
        StringToken String              deriving Show

type Point = (Double, Double, Double)

type TokenSequence  = [GmlToken]
type TokenStack     = [GmlToken]
type Environment    = [(String, GmlToken)]
